/* global BMapGL */

    /* global mapv */

    /* global mapvgl */

    /* global initMap */

    /* global whiteStyle */

    /* global purpleStyle */

    var map = initMap({
        tilt: 0,
        heading: 0,
        center: [110.310739,20.000249],
        zoom: 13,
        style: purpleStyle
    });

    var view = new mapvgl.View({
        // effects: [new mapvgl.BloomEffect({
        //     blurSize: 3
        // })],
        map: map
    });

    fetch('./data/2017-05-01-route.json').then(rs => {
        return rs.json();
    }).then(rs => {

        // var dataSet = mapv.csv.getDataSet(csvstr);
        // var data = dataSet.get();
        // for (var i = 0; i < data.length; i++) {
        //     data[i].properties = {
        //         count: data[i].geometry.coordinates.length
        //     };
        // }

        var layer = new mapvgl.HeatLineLayer({
            min: 0,
            max: 1,
            gradient: { // 对应比例渐变色
                1: 'rgba(0, 0, 255, 0.4)',
                1: 'rgba(0, 102, 255, 0.3)',
                1: 'rgba(102, 255, 255,0.3)',
                1: 'rgba(204, 255, 255,0.5)'
            }
        });
        data = rs.hour8
        view.addLayer(layer);
        layer.setData(data);
    });